package com.buydeem.builder;

/**
 * 构建者模式
 *
 * @author zengchao
 * @date 2022-04-25 15:55:55
 */
public class App {
    public static void main(String[] args) {
        //家用车
        CarBuilder builder = new FamilyCarBuilder();
        Director director = new Director(builder);
        Car car = director.build();
        System.out.println(car);
        //SUV
        builder = new SUVBuilder();
        director.setBuilder(builder);
        car = director.build();
        System.out.println(car);
    }
}
